package com.tmc.dao.impl.inthotel;

import org.hibernate.Query;
import org.hibernate.Session;
import org.springframework.stereotype.Repository;

import com.tmc.dao.impl.BaseDaoImpl;
import com.tmc.entity.inthotel.ToDestinationResult;

@Repository
public class ToDestinationResultDaoImpl extends BaseDaoImpl {

	public ToDestinationResult findAllByDestinationResultId(Integer destinationResultId){
		Session session = getSession();
		String hql = "from ToDestinationResult as dr where dr.destinationResultId = :destinationResultId ";
		Query query = session.createQuery(hql);
		query.setInteger("destinationResultId",destinationResultId);
		ToDestinationResult destinationResult =(ToDestinationResult)query.uniqueResult();
		return destinationResult;
	}
	
}
